package obj.day6;

import java.time.DayOfWeek;
import java.time.LocalDateTime;

/**
 * @author げっしょく
 * @date 2021/7/22
 */
public class Test6 {
    public static void main(String[] args) {
        LocalDateTime localDateTime =LocalDateTime.now();
        int year = localDateTime.getYear();
        System.out.println("今天是"+ year +"年");
        int monthValue = localDateTime.getMonthValue();
        System.out.println("今天是"+monthValue +"月");
        int dayOfYear = localDateTime.getDayOfYear();
        System.out.println("今天是"+ dayOfYear +"天");
        DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();
        System.out.println("今天是"+ year +"周");
//        DayOfWeek dayOfWeek1 = localDateTime.getDayOfWeek();
//        System.out.println("今天是"+ year +"年");
        int hour = localDateTime.getHour();
        System.out.println("今天是"+ hour +"小时");
        int minute = localDateTime.getMinute();
        System.out.println("今天是"+ minute +"分钟");
    }
}
